package com.stylefeng.guns.common.constant.bean;

import com.stylefeng.guns.common.constant.PointConstType;

import java.util.ArrayList;
import java.util.List;

/**
 * 积分类型实体
 */
public class PointTypePojo {

    private double contestPoints;

    private double cycleAuthenPoints;

    private double degreeTrainPoints;

    private double expertTalentsPoints;

    private double fulltimeTrainPoints;

    private double mentoringRelationPoints;

    private double networkTrainPoints;

    private double projectAuthenPoints;

    private double proqualifyTrainPoints;

    private double protechTrainPoints;

    private double trainerAuthenPoints;

    private double trainerExcellentPoints;

    private double trainProgramPoints;

    private double practicePoints;



    public double getContestPoints() {
        return contestPoints;
    }

    public void setContestPoints(double contestPoints) {
        this.contestPoints = contestPoints;
    }

    public double getCycleAuthenPoints() {
        return cycleAuthenPoints;
    }

    public void setCycleAuthenPoints(double cycleAuthenPoints) {
        this.cycleAuthenPoints = cycleAuthenPoints;
    }

    public double getDegreeTrainPoints() {
        return degreeTrainPoints;
    }

    public void setDegreeTrainPoints(double degreeTrainPoints) {
        this.degreeTrainPoints = degreeTrainPoints;
    }

    public double getExpertTalentsPoints() {
        return expertTalentsPoints;
    }

    public void setExpertTalentsPoints(double expertTalentsPoints) {
        this.expertTalentsPoints = expertTalentsPoints;
    }

    public double getFulltimeTrainPoints() {
        return fulltimeTrainPoints;
    }

    public void setFulltimeTrainPoints(double fulltimeTrainPoints) {
        this.fulltimeTrainPoints = fulltimeTrainPoints;
    }

    public double getMentoringRelationPoints() {
        return mentoringRelationPoints;
    }

    public void setMentoringRelationPoints(double mentoringRelationPoints) {
        this.mentoringRelationPoints = mentoringRelationPoints;
    }

    public double getNetworkTrainPoints() {
        return networkTrainPoints;
    }

    public void setNetworkTrainPoints(double networkTrainPoints) {
        this.networkTrainPoints = networkTrainPoints;
    }

    public double getProjectAuthenPoints() {
        return projectAuthenPoints;
    }

    public void setProjectAuthenPoints(double projectAuthenPoints) {
        this.projectAuthenPoints = projectAuthenPoints;
    }

    public double getProqualifyTrainPoints() {
        return proqualifyTrainPoints;
    }

    public void setProqualifyTrainPoints(double proqualifyTrainPoints) {
        this.proqualifyTrainPoints = proqualifyTrainPoints;
    }

    public double getProtechTrainPoints() {
        return protechTrainPoints;
    }

    public void setProtechTrainPoints(double protechTrainPoints) {
        this.protechTrainPoints = protechTrainPoints;
    }

    public double getTrainerAuthenPoints() {
        return trainerAuthenPoints;
    }

    public void setTrainerAuthenPoints(double trainerAuthenPoints) {
        this.trainerAuthenPoints = trainerAuthenPoints;
    }

    public double getTrainerExcellentPoints() {
        return trainerExcellentPoints;
    }

    public void setTrainerExcellentPoints(double trainerExcellentPoints) {
        this.trainerExcellentPoints = trainerExcellentPoints;
    }

    public double getPracticePoints() {
        return practicePoints;
    }

    public void setPracticePoints(double practicePoints) {
        this.practicePoints = practicePoints;
    }

    public double getTrainProgramPoints() {
        return trainProgramPoints;
    }

    public void setTrainProgramPoints(double trainProgramPoints) {
        this.trainProgramPoints = trainProgramPoints;
    }

    /**
     * 数据改变
     * @param type
     * @param changeValue
     */
    public void change(String type, double changeValue){
        switch (type){
            case PointConstType.contestPoints :
                setContestPoints(getContestPoints()+changeValue<0?0:getContestPoints()+changeValue);
                break;
            case PointConstType.cycleAuthenPoints :
                setCycleAuthenPoints(getCycleAuthenPoints()+changeValue<0?0:getCycleAuthenPoints()+changeValue);
                break;
            case PointConstType.degreeTrainPoints :
                setDegreeTrainPoints(getDegreeTrainPoints()+changeValue<0?0:getDegreeTrainPoints()+changeValue);
                break;
            case PointConstType.expertTalentsPoints :
                setExpertTalentsPoints(getExpertTalentsPoints()+changeValue<0?0:getExpertTalentsPoints()+changeValue);
                break;
            case PointConstType.fulltimeTrainPoints :
                setFulltimeTrainPoints(getFulltimeTrainPoints()+changeValue<0?0:getFulltimeTrainPoints()+changeValue);
                break;
            case PointConstType.mentoringRelationPoints :
                setMentoringRelationPoints(getMentoringRelationPoints()+changeValue<0?0:getMentoringRelationPoints()+changeValue);
                break;
            case PointConstType.networkTrainPoints :
                setNetworkTrainPoints(getNetworkTrainPoints()+changeValue<0?0:getNetworkTrainPoints()+changeValue);
                break;
            case PointConstType.projectAuthenPoints :
                setProjectAuthenPoints(getProjectAuthenPoints()+changeValue<0?0:getProjectAuthenPoints()+changeValue);
                break;
            case PointConstType.proqualifyTrainPoints :
                setProqualifyTrainPoints(getProqualifyTrainPoints()+changeValue<0?0:getProqualifyTrainPoints()+changeValue);
                break;
            case PointConstType.protechTrainPoints :
                setProtechTrainPoints(getProtechTrainPoints()+changeValue<0?0:getProtechTrainPoints()+changeValue);
                break;
            case PointConstType.trainerAuthenPoints :
                setTrainerAuthenPoints(getTrainerAuthenPoints()+changeValue<0?0:getTrainerAuthenPoints()+changeValue);
                break;
            case PointConstType.trainerExcellentPoints :
                setTrainerExcellentPoints(getTrainerExcellentPoints()+changeValue<0?0:getTrainerExcellentPoints()+changeValue);
                break;
            case PointConstType.trainProgramPoints :
                setTrainProgramPoints(getTrainProgramPoints()+changeValue<0?0:getTrainProgramPoints()+changeValue);
                break;
            case PointConstType.practicePoints :
                setPracticePoints(getPracticePoints()+changeValue<0?0:getPracticePoints()+changeValue);
                break;
        }
    }

    /**
     * 获取option的key
     * @return
     */
    public List<String> parseOptionKey(){
        List<String> list=new ArrayList<>();
        list.add("竞赛调考");
        list.add("学历提升");
        list.add("专家人才");
        list.add("脱产培训");
        list.add("师带徒");
        list.add("网络培训");
        list.add("职业资格");
        list.add("专业技术资格");
        list.add("项目培训开发");
        list.add("兼职培训");
        list.add("执业资格");
        return list;

    }

    /**
     * 获取option的value
     * @return
     */
    public List<Double> parseOptionValue(){
        List<Double> list=new ArrayList<>();
        list.add(getContestPoints());
        list.add(getDegreeTrainPoints());
        list.add(getExpertTalentsPoints());
        list.add(getFulltimeTrainPoints());
        list.add(getMentoringRelationPoints());
        list.add(getNetworkTrainPoints());
        list.add(getProqualifyTrainPoints());
        list.add(getProtechTrainPoints());
        list.add(getTrainProgramPoints());
        list.add(getCycleAuthenPoints()+getTrainerExcellentPoints()+getProjectAuthenPoints()+getTrainerAuthenPoints());
        list.add(getPracticePoints());
        return list;
    }
}
